function [prob] = fdist(f, df1, df2)
prob = 2.0*beta_i(0.5*df2, 0.5*df1, df2/(df2+df1*f));
if(prob > 1) prob = 2 - prob;
end
